package com.liyuxiang.graph.service;

import com.liyuxiang.feign.client.DeptClient;
import com.liyuxiang.feign.entity.Dept;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.ResponseData;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @Author: liyuxiang
 * @Date: 2025/8/22 10:59
 * @Description: TODO
 */
@Service
public class DeptService {
    private static final Logger logger = LoggerFactory.getLogger(DeptService.class);
    @Autowired
    DeptClient deptClient;

    @Tool(description = "获取所有科室信息", name = "getDeptList")
    public List<Dept> getDeptList() {
        List<Dept> deptList = deptClient.getDeptList("true").getData();
        logger.info("科室列表 {}", deptList);
        return deptList;
    }
}
